package com.test.resumeanalysis.common

import android.os.Bundle
import android.view.LayoutInflater
import android.view.MenuItem
import androidx.appcompat.app.AppCompatActivity
import androidx.viewbinding.ViewBinding

abstract class BaseVBActivity <VB : ViewBinding>(private val inflate: (LayoutInflater) -> VB) : AppCompatActivity() {

    lateinit var binding: VB

    open fun initView() = Unit
    open fun initEvent() = Unit

    protected abstract fun onInit(savedInstanceState: Bundle?)

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = inflate(layoutInflater)
        setContentView(binding.root)
        onInit(savedInstanceState)
    }



}
